/**
 * 附件上传插件,基于layui
 * @type {{}}
 */
Annex = {};
let layer, $;

/**
 * 初始化方法
 */
Annex.init = function () {
    layui.use('layer',function(){
        layer = layui.layer, $ = layui.jquery;
    });
    //let _tempDiv = $('<div style="display: none;"></div>');
    //$(_tempDiv).appendTo("body");
};
Annex.init();

/**
 * 附件上传
 */
Annex.upload = function () {
    layer.open({
        title: '附件上传'
        ,skin: 'demo-class'
        ,type: 2
        ,area: ['600px', '400px']
        ,maxmin: true
        ,content: [WEBAPP_ROOTPATH + '/pages/component/annex/annex.html?fkUuid='+Annex.id, 'no']
        ,success: function(layero, index){
            console.log(layero, index);
        }
    });
};

/**
 * 附件查看
 */
Annex.view = function () {
    layer.open({
        title: '附件查看'
        ,skin: 'demo-class'
        ,type: 2
        ,area: ['600px', '400px']
        ,maxmin: true
        ,content: [WEBAPP_ROOTPATH + '/pages/component/annex/annex.html?fkUuid='+Annex.id, '']
        ,success: function(layero, index){
            console.log(layero, index);
        }
    });
};


